Hi SJH,
Flashing "New Version" is only flashing firmware to the Flash memory. Flash memory is never directly executed. On the next boot this will be moved to Internal and SDRAM Memory and executed.
When "CoffLoad" with pack to flash option for the New Version, the data is temporarily placed in the gather buffer in a format ready to be flashed. It also doesn't effect the currently running firmware.
So there is no need to stop Thread 7 and to worry about incompatibility.
Actually if the script command is issued to Flash the downloaded New Version the other threads will be temporarily stopped while Flashing to speed up the Flash process but they will resume after Flashing is complete, But as stated the New Version will not be executed until the next boot.
After the next boot, the New Version will be executing with no options to Launch User Programs on Startup and there will be no User Programs Present.
You might then do your steps 6-9
HTH
Regards
TK
Group: DynoMotion |
Message: 12126 |
From: Hardy Family |
Date: 8/18/2015 |
Subject: Re: Correct way to flash firmware and user programs |
Yes, that helps, thanks.
So to summarize, an efficient way to update firmware and user programs would be: 1. Shut down any running threads cleanly (this is very fast, so may as well do it). 2. CoffLoad(...pack_to_flash) for the new firmware -> gather buffer 3. ProgFlashImage: gather buffer -> flash. Old firmware still executing in RAM, so safe to go back to step 2 if any errors.
4. Reboot!: boot kflop into new firmware. No auto thread start, regardless of previous SetStartupThread settings. 4a: Version: read back new version info to confirm booted OK. If not, admit defeat and start kmotion.exe to recover.
5. CoffLoad(user thread(s)) for updated software -> thread RAM
6. SetStartupThread as required. 7. FLASH: thread RAM -> flash. Can repeat from step 4 if errors. 8: optionally write config data to high half of 2M flash, using a temporary user thread program.
9. Start thread 7 and continue.
I'll give it a try and report back if any problems.
Regards,
SJH
| |